﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="PersonEdit.aspx.cs" Inherits="masterdata_PersonEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .style1
        {
            width: 165px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <asp:ScriptManagerProxy runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <table id="wsd_inputtable">
                <tr>
                    <td colspan="6" class="tabletitle">
                        <font color="red" size="2"><b>&nbsp; 提示:*为必填项</b></font> 
                    </td>
                </tr>
                <tr>
                    <td class="tablefield" >
                        <span class="keyword">*</span>姓&nbsp;&nbsp;&nbsp;&nbsp;名:
                    </td>
                    <td >
                        <input id="txtName" type="text" class="default"  runat="server" maxlength="20" /><br />
                         <asp:RequiredFieldValidator ID="v3" runat="server" ControlToValidate="txtName" 
                             ErrorMessage="姓名不能为空" Font-Bold="True" Display="Dynamic" />
                    </td>
                    
                    <td class="tablefield">
                        <span class="keyword">*</span>部门:
                    </td>
                    <td nowrap="nowrap">
                        <asp:TextBox ID="txtOrg"  class="default"  runat="server" 
                            onkeydown="alert('请选择部门');return false;" ontextchanged="txtOrg_TextChanged"></asp:TextBox>
                        <img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID  %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=single','','300','500');" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="txtOrg" Display="Dynamic" ErrorMessage="部门不能为空" Font-Bold="True"></asp:RequiredFieldValidator>
                    </td>
                   
                    <td class="tablefield">
                        <span class="keyword">*</span>编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</td>
                    <td >
                        <input id="txtCode" type="text" class="default"  runat="server" maxlength="20" />
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txtCode" ErrorMessage="*" Font-Bold="True"></asp:RequiredFieldValidator>
                    </td>
                 
                    
                </tr>
                <tr>
                   <td nowrap="nowrap" class="tablefield">
                        身份证:
                    </td>
                    <td nowrap="nowrap" class="style1">
                        <asp:TextBox ID="txtIdentity" class="default"  runat="server" MaxLength="18"></asp:TextBox>
                        <br />
                          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ControlToValidate="txtIdentity" ErrorMessage="号码格式错误!" SetFocusOnError="True" 
                            ValidationExpression="(^\d{15}$)|(\d{17}(?:\d|x|X)$)" Font-Bold="True" 
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                   
                    <td class="tablefield">
                        电话号码:</td>
                    <td nowrap="nowrap">
                        <input id="txtTelephone" type="text" class="default"  runat="server" maxlength="20" />
                        <br />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                            ControlToValidate="txtTelephone" Display="Dynamic" ErrorMessage="电话号码格式错误!" 
                            Font-Bold="True" SetFocusOnError="True" 
                            ValidationExpression="(^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$)|(^((\(\d{3}\))|(\d{3}\-))?(1[358]\d{9})$)"></asp:RegularExpressionValidator>
                    </td>
                    
                    <td class="tablefield" nowrap="nowrap">
                        电子邮件:
                    </td>
                    <td nowrap="nowrap">
                        <input id="txtMail" type="text" class="default"  runat="server" maxlength="40" />
                        <br />
                        <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                            ControlToValidate="txtMail" Display="Dynamic" ErrorMessage="请输入正确的Email!" 
                            Font-Bold="True" 
                            ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
                        </td>
                    
                </tr>
                <tr>
                      <td class="tablefield">
                           传&nbsp;&nbsp;&nbsp;&nbsp;真: 
                    </td>
                    <td nowrap="nowrap" class="style1">
                        <input id="txtFax" type="text" runat="server"  class="default"  maxlength="20" /></td>
                    
                      <td class="tablefield" nowrap="nowrap">
                          <span class="keyword">*</span>职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位:
                      </td>
                    <td nowrap="nowrap">
                        <asp:DropDownList ID="ddlPosition" runat="server" DataTextField="Name" 
                            DataValueField="DictionaryItemID" Width="150px">
                        </asp:DropDownList>
                        <asp:CompareValidator ID="CompareValidator2" runat="server" 
                            ControlToValidate="ddlPosition" ErrorMessage="请选择职位" Font-Bold="True" 
                            Operator="NotEqual" ValueToCompare="--请选择--" Display="Dynamic" />
                    </td>
                    
                      <td class="tablefield" nowrap="nowrap">
                          入职时间:</td>
                    <td nowrap="nowrap">
                        <input id="txtJoinDate" type="text" class="Wdate" runat="server"  onfocus="WdatePicker();"  /><br />
                        <asp:RangeValidator ID="rv1" runat="server" ControlToValidate="txtJoinDate" 
                            Display="Dynamic" ErrorMessage="入职时间不能大于当前时间!" Font-Bold="True" Type="Date"></asp:RangeValidator>
                        
                    </td>
                   
                </tr>
                <tr>
                    <td class="tablefield">
                        主&nbsp;&nbsp;&nbsp;&nbsp;管:</td>
                    <td nowrap="nowrap" class="style1">
                        <asp:DropDownList ID="ddlManager" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td nowrap="nowrap" class="tablefield">
                        性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
                    <td nowrap="nowrap">
                        <select ID="ddlSex" runat="server" name="D1">
                            <option value="0">男</option>
                            <option value="1">女</option>
                        </select></td>
                    <td  class="tablefield">
                        有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;效: </td>
                    <td nowrap="nowrap">
                        <asp:CheckBox ID="chkValid" runat="server" Checked="true" />
                    </td>
                </tr>
                <tr>
                   
                 <td colspan="6">
                    <input id="txtHidOrg" type="hidden" runat="server" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

    <table id="wsd_inputtable">
        <tr>
            <td colspan="2" width="100%" class="tabletitle">
                操作选项
            </td>
        </tr>
        <tr>
            <td class="buttonarea">
                <asp:Button ID="btnSave" runat="server" class="wsd_button2" Text="提  交" OnClick="btnSave_Click" />
                
                &nbsp;<input class="wsd_button2" onclick="location.href='PeopleList.aspx'" type="button"
                    value="返  回" />
            </td>
        </tr>
    </table>
</asp:Content>
